package com.cblz.bd.server.core.controller;

import com.cblz.bd.server.utils.BdCaptchaUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * {@code @Name:} CaptchaController
 * {@code @Description: } 校验码控制层
 * {@code @Author:} by yanjieping
 * {@code @CreateDate:} 2023/2/14 - 周二
 */
@RestController
@RequiredArgsConstructor
public class CaptchaController {
    private final BdCaptchaUtil bdCaptchaUtil;

    @GetMapping("api/captcha")
    public void getCaptcha(HttpServletRequest request, HttpServletResponse response) {
        bdCaptchaUtil.initCaptcha(request, response);
    }
}
